package com.example.demo.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2024-02-23
 * Time: 9:48
 */
@Slf4j
@Component
@Aspect
public class MyAspectDemo {

    @Before("@annotation(com.example.demo.aspect.MyAspect)")
    public void  doBefore(){
      log.info("执行MyAspectDemo before。。。");
    }

    @After("@annotation(com.example.demo.aspect.MyAspect)")
    public void  doAfter(){
        log.info("执行MyAspectDemo before。。。");
    }
}
